home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 October
/
PCWorld_2006-10_cd.bin
/
domacnost a kancelar
/
winorganizer
/
WinOrg.exe
/
PluginsAndCOM
/
Plugins
/
Demo
/
fDocProp.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
2005-07-06
|
2KB
|
75 lines
unit fDocProp;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComObj, ActiveX, ExtCtrls;
type
TfrmDocProperties = class(TForm)
Memo1: TMemo;
Panel1: TPanel;
Button1: TButton;
private
{ Private declarations }
public
{ Public declarations }
class procedure Execute;
end;
var
frmDocProperties: TfrmDocProperties;
implementation
{$R *.DFM}
{ TfrmDocProperties }
class procedure TfrmDocProperties.Execute;
var
WOrg, ActiveFile, ActiveDocument: Variant;
begin
//CoInitialize(0);
WOrg := CreateOLEObject('WinOrganizer.App');
Application.Handle := WOrg.Handle;
with TfrmDocProperties.Create(Application) do
try
Memo1.Lines.Add('GoldenSection WinOrganizer');
Memo1.Lines.Add(' ApiVersion: ' + String(WOrg.ApiVersion));
Memo1.Lines.Add(' AppVersion: ' + WOrg.AppVersion);
Memo1.Lines.Add(' AppBuild: ' + String(WOrg.AppBuild));
Memo1.Lines.Add('');
if WOrg.FileList.ActiveIndex < 0 then
Memo1.Lines.Add('No file selected')
else
begin
ActiveFile := WOrg.FileList.ActiveFile;
Memo1.Lines.Add('FileName:');
Memo1.Lines.Add(' ' + ActiveFile.FileName);
Memo1.Lines.Add('');
ActiveDocument := ActiveFile.Selected;
Memo1.Lines.Add('Selected document');
if VarIsEmpty(ActiveDocument) then
Memo1.Lines.Add('No selected document')
else
begin
Memo1.Lines.Add(' Text: ' + ActiveDocument.Text);
Memo1.Lines.Add(' Ext: ' + ActiveDocument.Ext);
Memo1.Lines.Add(' Guid: ' + ActiveDocument.Guid);
end;
end;
ShowModal;
finally
Free;
end;
end;
end.